import FormSucCaseSetting from './FormSucCaseSetting.vue';
import FormSucCaseView from './FormSucCaseView.vue';
import FormSucCasePreview from './FormSucCasePreview.vue';
import FormSucCase from './FormSucCase.vue';
import { t } from '@src/locales'


let FormSubSucCaseField = {
    fieldName: 'subSucCase',
    formType: 'subSucCase',
    name: t('common.fields.subSucCase.displayName'),
    isSystem: 1,
    forceDelete: true,
    previewIcon: 'icon-bulb',
    isSystemControl: true,
    subFormFieldList: [
      {
        isSystem: 1,
        fieldName: "projectNameSub",
        displayName: "项目名称",
        formType: "text",
        defaultValue: null,
        isNull: 0,
        placeHolder: "请输入",
        setting: {},
        orderId: 1,
        isDelete: 0,
        enabled: 1,
        showIsNull: 2,
        parentFieldId: "subSucCase",
     },
      {
        isSystem: 1,
        fieldName: "projectIndustrySub",
        displayName: "项目行业",
        formType: "text",
        defaultValue: null,
        isNull: 0,
        placeHolder: "请输入",
        setting: {},
        orderId: 2,
        isDelete: 0,
        enabled: 1,
        showIsNull: 2,
        parentFieldId: "subSucCase",
      },
      {
        isSystem: 1,
        fieldName: "projectTimeSub",
        displayName: "项目时间",
        formType: "date",
        defaultValue: null,
        isNull: 0,
        placeHolder: "请输入",
        setting: {dateType: 'yyyy-MM'},
        orderId: 1,
        isDelete: 0,
        enabled: 3,
        showIsNull: 2,
        parentFieldId: "subSucCase",
      },
      {
        isSystem: 1,
        fieldName: "projectDescSub",
        displayName: "项目描述及成果",
        formType: "textarea",
        defaultValue: null,
        isNull: 0,
        placeHolder: "请输入",
        setting: {},
        orderId: 4,
        isDelete: 0,
        enabled: 1,
        showIsNull: 2,
        parentFieldId: "subSucCase",
      },
      {
        isSystem: 1,
        fieldName: "projectAttacSub",
        displayName: "附件",
        formType: "attachment",
        defaultValue: null,
        isNull: 1,
        placeHolder: "请选择",
        setting: {},
        orderId: 5,
        isDelete: 0,
        enabled: 1,
        showIsNull: 2,
        parentFieldId: "subSucCase",
      }
    ],
    isSubForm: true,
    component: {
        setting: FormSucCaseSetting,
        preview: FormSucCasePreview,
        view: FormSucCaseView,
        build: FormSucCase,
        extend: {}
    }
};

let FormSubCertificationsField = {
    fieldName: 'subCertifications',
    formType: 'subCertifications',
    name: '资质证书',
    isSystem: 1,
    previewIcon: 'icon-zizhi',
    forceDelete: true,
    isSystemControl: true,
    subFormFieldList: [
        {
            isSystem: 1,
            fieldName: "certificationsNameSub",
            displayName: "证书名称",
            formType: "text",
            defaultValue: null,
            isNull: 0,
            placeHolder: "请输入",
            setting: {},
            orderId: 1,
            isDelete: 0,
            enabled: 1,
            showIsNull: 2,
            tickStatus: null,
            parentFieldId: "subCertifications",
        },
        {
            isSystem: 1,
            fieldName: "certificationsTimeSub",
            displayName: "证书有效期",
            formType: "date",
            defaultValue: null,
            isNull: 0,
            placeHolder: "请输入",
            setting: {dateType: 'yyyy-MM'},
            orderId: 1,
            isDelete: 0,
            enabled: 3,
            showIsNull: 2,
            parentFieldId: "subCertifications",
        },
        {
            isSystem: 1,
            fieldName: "certificationsAttacSub",
            displayName: "证件照片",
            formType: "attachment",
            defaultValue: null,
            isNull: 1,
            placeHolder: "请选择",
            setting: {},
            orderId: 3,
            isDelete: 0,
            enabled: 1,
            showIsNull: 2,
            parentFieldId: "subCertifications",
        }
    ],
    isSubForm: true,
    component: {
        setting: FormSucCaseSetting,
        preview: FormSucCasePreview,
        view: FormSucCaseView,
        build: FormSucCase,
        extend: {}
    }
};
export default [
    FormSubSucCaseField,
    FormSubCertificationsField,
];
